package com.example.sharding.algorithms;

import org.apache.shardingsphere.api.sharding.standard.RangeShardingAlgorithm;
import org.apache.shardingsphere.api.sharding.standard.RangeShardingValue;

import java.util.Collection;

/**
 *
 * 区间分片算法
 *
 * @author zxs
 * @since 2021/9/22
 */
public class OrderRangeShardingAlgorithm implements RangeShardingAlgorithm<Integer> {


    /**
     * Sharding.
     *
     * @param availableTargetNames available data sources or tables's names
     * @param shardingValue sharding value
     * @return sharding results for data sources or tables's names
     */
    @Override
    public Collection<String> doSharding(Collection<String> availableTargetNames, RangeShardingValue<Integer> shardingValue) {

        shardingValue.getValueRange().upperBoundType();
        return null;
    }
}
